﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mappings;

namespace Apollo.Modules.Sales
{
    [NHibernateEntity(Table = "OpportunityProducts")]
    public class OpportunityProduct : ITrackable
    {
        public OpportunityProduct() { }

        [PrimaryKey]
        public virtual int Id { get; set; }

        [BelongsTo(Column = "ID_Opportunity", NotNull = true)]
        public virtual Opportunity Opportunity { get; set; }

        [BelongsTo(Column = "ID_Product", NotNull = true)]
        public virtual Product Product { get; set; }


        [Property]
        public virtual double Price { get; set; }

        [Property]
        public virtual double Quantity { get; set; }

        [Property]
        public virtual OpportunityState State { get; set; }

        [Property]
        public virtual string Comment { get; set; }



        [Property]
        public virtual DateTime InsertDate { get; set; }

        [Property]
        public virtual string InsertBy { get; set; }

        [Property]
        public virtual DateTime? ModifiedDate { get; set; }

        [Property]
        public virtual string ModifiedBy { get; set; }

    }
}
